package com.ybkj.daijia.server.mapper;

import com.ybkj.daijia.server.model.DriverRefuseRecord;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DriverRefuseRecordMapper {

    /**
     * 保存司机拒单记录到数据库
     *
     * @param record
     * @return 保存成功返回Id信息
     */
    int insertRecord(DriverRefuseRecord record);

    /**
     * 根据主键查询司机拒单记录
     *
     * @param id
     * @return
     */
    DriverRefuseRecord selectByPrimaryKey(Long id);

    /**
     * 根据主键删除司机拒单记录
     *
     * @param id
     * @return 返回影响的行数
     */
    int deleteByPrimaryKey(Long id);

    List<DriverRefuseRecord> selectList(@Param("companyId") Long companyId,
        @Param("orderNumber") String orderNumber, @Param("employPhone") String employPhone,
        @Param("orderType") String[] orderType,
        @Param("start") Date start, @Param("end") Date end,
        @Param("offset") Integer offset, @Param("size") Integer size);

    Long countList(@Param("companyId") Long companyId,
        @Param("orderNumber") String orderNumber, @Param("employPhone") String employPhone,
        @Param("orderType") String[] orderType,
        @Param("start") Date start, @Param("end") Date end);

    Long countByOrderIdEmployIdAndOrderType(@Param("orderId") Long orderId,
        @Param("employId") Long employId, @Param("orderType") String orderType);


}
